package com.iphanta.community.following.mapper;

import com.iphanta.community.following.entity.UserBehavior;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 墨声 E-mail: zehong.hongframe.huang@gmail.com
 * create time: 2/23/22 11:59 AM
 */
@Mapper
public interface UserBehaviorMapper {

    Integer insert(UserBehavior behavior);

    UserBehavior select(@Param("followingId") String followingId,
                        @Param("followerId") String followerId,
                        @Param("behaviorType") Integer behavior);

    Integer resolve(String followerId);

    Integer selectUnresolved(String followerId);

    Integer updateUnfollow2Yep(@Param("id") Long behaviorId);

    List<String> selectNewlyFollow(String followerId);

    List<String> selectNewlyUnfollow(String followerId);

}
